package org.xandroid.graphic;

import java.util.ArrayList;

/**
 * 由一组点组成的线
 * @author Kross(krossford@foxmail.com)
 * @date 2014-3-31 15:48:47
 * */
public class XLine {
	private ArrayList<XPoint> line = null;
	
	public XLine() {
		line = new ArrayList<XPoint>();
	}
	
	public static XLine newInstance() {
		XLine l = new XLine();
		return l;
	}
	
	public void addPoint(XPoint p) {
		line.add(p);
	}

	@Override
	public String toString() {
		StringBuffer sb = new StringBuffer();
		for (XPoint temp : line) {
			sb.append(temp.toString() + ", ");
		}
		return sb.toString();
	}
}
